﻿@model LawProject.Models.NguyenCustomPage
@{
    Layout = null;
    
}

<!DOCTYPE html>

<html>
<head>
    <title>Partial</title>
</head>
<body>
    <div id="tinmoi">
     <ul>
     @foreach (var item in Model.PageContent)
     {
     <li>@item.Title</li>
     }
     </ul>
    <div>
    <div style=" float:left; width:30px;">
        @Ajax.ActionLink(Model.StringDau, "Partial", new { current = Model.ListTrang.ElementAt(0), requestId = 0 }, new AjaxOptions { UpdateTargetId = "timeDisplay", HttpMethod = "GET", InsertionMode = InsertionMode.Replace }, new { @class = "linkpage" })
    </div>

    <div style=" float:left; width:30px;">
    @Ajax.ActionLink(Model.StringPre, "Partial", new { current = Model.ListTrang.ElementAt(0), requestId = Model.ListTrang.ElementAt(0) - 1 }, new AjaxOptions { UpdateTargetId = "timeDisplay", HttpMethod = "GET", InsertionMode = InsertionMode.Replace }, new { @class = "linkpage" })
    </div>
    
    @for (int i = 0; i < Model.ListTrang.Count; i++)
    {
        int link = Model.ListTrang.ElementAt(i);
    if (i == Model.TrangHienTai)
    {
        
        <div style=" float:left; width:10px;padding-left:2px; padding-right:2px;">
        @Ajax.ActionLink(link.ToString(), "Partial", new {current = Model.ListTrang.ElementAt(0), requestId = link }, new AjaxOptions { UpdateTargetId = "timeDisplay", HttpMethod = "GET", InsertionMode = InsertionMode.Replace }, new { @class = "linkpagecurrent" })
        </div>
    }
    else
    {
         <div style=" float:left; width:10px; padding-left:2px; padding-right:2px;">
        @Ajax.ActionLink(link.ToString(), "Partial", new { current = Model.ListTrang.ElementAt(0), requestId = link }, new AjaxOptions { UpdateTargetId = "timeDisplay", HttpMethod = "GET", InsertionMode = InsertionMode.Replace }, new { @class = "linkpageitem", @id = i })
        </div>                                                                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                  
    }
}
<div style=" float:left; width:30px;">
        @Ajax.ActionLink(Model.StringNext, "Partial", new { current = Model.ListTrang.ElementAt(0), requestId = Model.ListTrang.ElementAt(Model.ListTrang.Count - 1) + 1 }, new AjaxOptions { UpdateTargetId = "timeDisplay", HttpMethod = "GET", InsertionMode = InsertionMode.Replace }, new { @class = "linkpage" })
    </div>
    <div style=" float:left; width:30px;">
        @Ajax.ActionLink(Model.StringCuoi, "Partial", new { current = Model.ListTrang.ElementAt(0), requestId = -1 }, new AjaxOptions { UpdateTargetId = "timeDisplay", HttpMethod = "GET", InsertionMode = InsertionMode.Replace }, new { @class = "linkpage" })
    </div>
</div>
    </div>
</body>
</html>
